﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using COC.Character;

namespace COC.Interaction
{
		public class CharacterManifest<T> : MonoBehaviour
		{
   
				public HashSet<T> collection = new HashSet<T> ();
				protected readonly object _lock = new object ();
				/// <summary>
				/// Find model 
				/// </summary>
				/// <param name="bm"></param>
				public virtual void find (BaseModel bm)
				{ 
				}
				/// <summary>
				/// save to persistent
				/// </summary>
				/// <param name="model"></param>
				/// <returns></returns>
				public virtual bool save (BaseModel model)
				{
						return false;
				}
				/// <summary>
				/// execute to update
				/// </summary>
				/// <param name="model"></param>
				/// <returns>if true,operatio is successfully</returns>
		        /**public virtual bool update (T model)
				{
						if (model is BaseModel) {
				BaseModel origin=(BaseModel)model;



						}
	  
						return false;
				}
		        */
				/// <summary>
				/// 
				///delete the model
				/// </summary>
				/// <param name="model"></param>
				/// <returns>if true,operation is successfully</returns>
				public virtual bool delete (BaseModel model)
				{ 
						return false;
				}
   
		}
}